namespace IrisGenerator.Common.Core
{
    using System.Collections.ObjectModel;
    
    
    public partial class TargetCollection : Collection<Target> {
        public static bool Exists(string code, out Target result)
        {
            if (string.IsNullOrEmpty(code))
            {
                result = null;
                return false;
            }

            result = Target.SelectByCode(code);
            if ( result!= null)
                return true;
            return false;
        }

        public static bool Exists(Target target, out Target result)
        {
            return TargetCollection.Exists(target.TarCode, out result);
        }
    }
}
